<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<button>点我修改表单内容</button>
<input type="text" value="" placeholder="请输入内容">
<script>
  var btn = document.querySelector('button');
  var input = document.querySelector('input');

  btn.onclick = function () {
    input.value = '修改后的内容';
    this.disabled = 'disabled'; // this指向事件函数的调用者 btn
  }
</script>
</body>

</html>